import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-07-14
 * Time: 16:19
 */

public class Test {
    public static int Sum(int[] num ,int n){

        if(n == num.length){
            return 0;
        }
        Sum(num,n+1);
        return Sum(num,n+1)+num[n];
    }

    public static void main(String[] args) {
        int num[] = {1,2,3,4,5,6};
        int ret = Sum(num,0);
        System.out.println(ret);
    }
    public static int Imacy(int num){
        int sum = 0;
        for (int i = 1; i < num ; i++) {
            if(num % i == 0){
                sum += i;
            }
        }
        return sum;
    }

    public static void main10(String[] args) {
        for (int i = 1; i <= 1000; i++) {
            for (int j = i; j <= 1000; j++) {
                int sum1 = Imacy(i);
                int sum2 = Imacy(j);
                if(sum1 == j && sum2 == i){
                    if(sum1 != i && sum2 != j){
                        System.out.print("相亲数是"+i+"和"+j);
                        break;
                    }
                }
            }
        }
    }

    public static void main9(String[] args) {
        int[][] arry = {{1,2,3},{4,5,6},{7,8,9}};
        int sum2 = 0;
        int j = 0;
        for (int i = 2; i >= 0 ; i--) {
            sum2 += arry[i][j];
            j++;
        }
        System.out.println(sum2);
    }

    public static void main8(String[] args) {
        int[][] arry = new int[3][3];
        int sum1 = 0;
        int sum2 = 0;
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                Random num = new Random();
                arry[i][j] = num.nextInt(100);
                if(i == j){
                    sum1 += arry[i][j];
                }
            }
        }
        for (int i = 2; i >= 0 ; i--) {
            int j = 0;
            sum2 += arry[i][j];
            j++;
        }
        System.out.println(sum1);
        System.out.println(sum2);
    }

    public static int getAge(int n){
        int age = 10;
        for (int i = 1; i < n; i++) {
            age += 2;
        }
        return age;
    }

    public static void main7(String[] args) {
        int ret = getAge(5);
        System.out.println(ret);
    }

    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int age = 10;
        for (int i = 1; i < n; i++) {
            age += 2;
        }
        System.out.println(age);
    }
/*    public static void main5 (String args[]) {
        Test t = new Test();
        float a  = t.f;
        System.out.println(a);
    }*/
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int f1 = 1;
        int f2 = 1;
        int f3 = 0;
        for (int i = 3; i <= n; i++) {
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;
        }
        System.out.println(f2);
    }
    public static void main3(String[] args) {
        double sum = 0;
        double meters = 100;
        double heigh = 0;
        for (int i = 10; i > 0; i--) {
            sum += meters;
            heigh = meters / 2;
            meters = heigh;
        }
        System.out.println(sum);
        System.out.println(heigh);
    }
    public static void main2(String[] args) {
        int sum = 0;
        int day = 1;
        int i = 9;
        for (; i > 0; i--) {
            sum = (day +1 ) * 2;
            day = sum;
        }
        System.out.println(sum);
    }
    public static void main1(String[] args) {
        int sum = 0;
        for (int i = 1; i < 10000; i++) {
            for (int j = 1; j < i; j++) {
                if(i % j == 0){
                    sum += j;
                }
            }
            if(sum == i){
                System.out.print(i + " ");
            }
            sum = 0;
        }
    }
}
